package com.cskaoyan.bean.category;

import lombok.Data;

import java.util.Date;
import java.util.Objects;

@Data
public class Category {
    private Integer id;

    private String name;

    private String keywords;

    private String desc;

    private Integer pid;

    private String iconUrl;

    private String picUrl;

    private String level;

    private Byte sortOrder;

    private Date addTime;

    private Date updateTime;

    private Boolean deleted;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Category category = (Category) o;
        return Objects.equals(id, category.id) &&
                Objects.equals(name, category.name) &&
                Objects.equals(keywords, category.keywords) &&
                Objects.equals(desc, category.desc) &&
                Objects.equals(pid, category.pid) &&
                Objects.equals(iconUrl, category.iconUrl) &&
                Objects.equals(picUrl, category.picUrl) &&
                Objects.equals(level, category.level) &&
                Objects.equals(sortOrder, category.sortOrder) &&
                Objects.equals(addTime, category.addTime) &&
                Objects.equals(updateTime, category.updateTime) &&
                Objects.equals(deleted, category.deleted);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, keywords, desc, pid, iconUrl, picUrl, level, sortOrder, addTime, updateTime, deleted);
    }
}